import request from '@/utils/request';



export async function pageQA(projectId, params) {
    return request(`/project/${projectId}/qaItem/page`, {
        params,
    });
}

export async function save(projectId, data) {
    return request(`/project/${projectId}/qaItem`, {
        method: "POST",
        data: data
    });
}

export async function update(projectId, qaId, data) {
    return request(`/project/${projectId}/qaItem/${qaId}`, {
        method: "POST",
        data: data
    });
}

export async function getDetail(projectId, qaId) {
    return request(`/project/${projectId}/qaItem/${qaId}`);
}


export async function getBriefDetail(projectId, qaId) {
    return request(`/project/${projectId}/qaItem/brief/${qaId}`);
}

export async function deleteQa(projectId, qaId) {
    return request(`/project/${projectId}/qaItem/${qaId}`, {
        method: "DELETE",
    });
}

export async function updateIsArchived(projectId, qaId, isArchived) {
    return request(`/project/${projectId}/qaItem/${qaId}/${isArchived}`, {
        method: "POST",
    });
}